//
//  entities.cpp
//  RPG
//
//  Created by Matt Bailey on 16/03/2014.
//  Copyright (c) 2014 Matt Bailey. All rights reserved.
//

#include "entities.hpp"

void Entities::init() {
    
    miku.init(glm::vec2(0, 0));
}

void Entities::updateMiku() {
    
    if (miku.getPosition().x < 0) {
        Entities::miku.setPosition(glm::vec2(miku.getPosition().x, miku.getPosition().y));
    }
    
    else if (miku.getPosition().x > Map::world.getWidth()) {
        Entities::miku.setPosition(glm::vec2(0, miku.getPosition().y));
    }
    
    else if (miku.getPosition().y < 0) {
        Entities::miku.setPosition(glm::vec2(miku.getPosition().x, Map::world.getHeight() - Map::getHeight() + miku.getPosition().y));
    }
    /*
    else if (miku.getPosition().y > Map::world.getHeight()) {
        Entities::miku.setPosition(glm::vec2(miku.getPosition().x, 0));
        
    }*/
}


Player Entities::miku;